<?php
/*
 * tpl_header.php
 */
?>
<?php
  // Display all header alerts via messageStack:
  if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
  }
  if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
  echo htmlspecialchars(urldecode($_GET['error_message']));
  }
  if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
   echo htmlspecialchars($_GET['info_message']);
} else {

}
?>
<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>
<div id="headerWrapper">
<div id="headerWrapper-top">
<!-- Search START -->
<div id="headerWrapper-search">
	<div><?php require DIR_WS_MODULES . zen_get_module_directory('search_header.php') ?></div>
</div>
<!-- Search END -->

<!-- LOGIN INFO START -->
<div id="headerWrapper-login">
<?php 
if (!$_SESSION['customer_id']){
?>
	<span><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo 'Login'; ?></a></span>
	<span>|</span>
	<span><a href="<?php echo zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'); ?>"><?php echo 'Register'; ?></a></span>
	<span>|</span>
<?php	
}else{
?>
    <span><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></span>
    <span>|</span>
    <span><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></span>
    <span>|</span>
<?php	
}
?>
	<span><img src="<?php echo DIR_WS_TEMPLATE_IMAGES.'shoping_cart.png'?>" alt="shoping cart" /><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART)?>"><?php echo $_SESSION['cart']->count_contents() ?>&nbsp;Items</a></span>
	<div style="float:right;padding-top:5px;"><?php require(DIR_WS_MODULES.zen_get_module_directory('currencies_header.php')); ?></div>
</div>
<!-- LOGIN INFO END -->
<div style="clear:both;"></div>
</div>
<div style="clear:both;"></div>
<!-- NAVIGATION START -->
<div id="headderWrapper-nav">
<?php 
require  $template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php';
?>
<div style="clear:both;"></div>
</div>
<!-- NAVIGATION END -->
</div>
<?php } ?>